package org.bread.worm.cms.web.controller;

import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class AdminController {

	
	/**
	 * 主页
	 * @return
	 */
	@RequestMapping("/admin")
	public String index(){
		return "admin/index";
	}
	
	/**
	 * 用户注销
	 * @param session
	 * @return
	 */
	@GetMapping("/admin/logout")
	public String logout(HttpSession session) {
		session.invalidate();
		return "redirect:/login";
	}
}
